import {roomTypeArray} from "../common";
import {tableOptBtnConfig} from "../table";

export default {
  "tableId": "roomTemplate",
  "name": "房间模板",
  "columns": [
    {
      label: '房间名称',
      width: 200,
      children: [
        {
          key: 'roomName',
          tooltip: true
        },
      ]
    },
    {
      label: '房间类别',
      width: 150,
      children: [
        {
          key: 'roomType'
        },
      ]
    },
    {
      label: '平板型号',
      width: 150,
      children: [
        {
          key: 'device',
        },
      ]
    },
    {
      label: '分辨率',
      "width": 120,
      children: [
        {
          html: true,
          key: 'size'
        },
      ],
    },
    {
      label: '预览图',
      "width": 180,
      children: [
        {
          html: true,
          image: true,
          key: 'previewImages'
        },
      ]
    },
    {
      label: '更新时间',
      width: 100,
      children: [
        {
          updatedDate: true
        }
      ],
    },
    {
      "label": "操作",
      "operation": true,
      "width": 250,
      "children": [
        {
          "button": true,
          type: tableOptBtnConfig.select.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.preview.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.edit.type,
        },
        {
          'dropdown': true,
          'options': [
            {
              'type': 'copy',
            },
            {
              'type': 'delete',
              'class': 'hover-font-danger'
            },
            {
              "type": 'export',
              "label": '导出房间模板配置',
            },
            {
              type: tableOptBtnConfig.exportZip.type,
              'label': '导出模版工程资源包',
            },
          ]
        }
      ]
    }
  ],
  "filters": [
    {
      "fieldType": "input",
      key: 'roomName',
      label: '房间名称'
    },
    {
      "fieldType": "input",
      key: 'device',
      label: '平板型号'
    },
    {
      "fieldType": "input",
      key: 'width',
      label: '分辨率(宽)'
    },
    {
      "fieldType": "input",
      key: 'height',
      label: '分辨率(高)'
    },
    {
      "fieldType": "string",
      key: 'roomType',
      label: '房间类别',
      "options": roomTypeArray
    },
  ]
}
